// import 'axios';
// import 'cos-js-sdk-v5';
// import 'vod-js-sdk-v6';
// import 'js-md5';
// import 'lodash';
// import 'tinymce/tinymce';

import { createApp } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
import Antd from 'ant-design-vue';
import routesList from '@/routes/index.js';
// import App from '@/widgets/layout.vue';
import App from '@/widgets/login/ttt2.vue';
import { RouterHelper } from '@evam/utils';
import mqjComponents from '@evam/components';

import 'ant-design-vue/dist/antd.css';
import '@evam/components/lib/components.esm-bundler.css';

// NODE_ENV,PROD_ENV,根据环境获取，以E_[环境变量]_为前缀,这里定义的主要目的是为了与富文本挂钩
// window.NODE_ENV = import.meta.env.MODE;
// window.PUBLISH_ENV = PROD_ENV;

// import logger from '@evam/logger';

const rh = new RouterHelper(routesList);

const router = createRouter({
  history: createWebHashHistory(),
  routes: rh.routes, // `routes: routes` 的缩写
});

let userInfo = localStorage.getItem(USERINFO);
if (userInfo) {
  userInfo = JSON.parse(userInfo);
}

const app = createApp(App);
app.config.globalProperties = { rh, $userInfo: userInfo };
app.use(router);
app.use(Antd);
app.use(mqjComponents);

app.mount('#app');
